*** Settings ***
Library           ../../CommonLibs/FDataFactors/DFactors.py
Resource          ../../CommonVars/Locations/SITSYS/MoudleView/LVhlOwnerView/LVhlOwnerView.robot
Resource          ../OpElements/COMM_JS.robot
Resource          ../OpElements/OpSelect.robot

*** Keywords ***
Op 车主信息
    [Arguments]    ${TypeOfOwnerCode}    ${IdentifyTypeCode}    ${sex}    ${age}    ${phone}    ${name1}    # 车主类型 车主证件类别
    [Documentation]    车主
    #车主类别
    Select From List By Value    ${LTypeOfOwnerCode}    ${TypeOfOwnerCode}
    # 样式
    ${Gdisplay}=    Get Element Attribute    ${LIdentifyTypeGroup}    style
    ${Pdisplay}=    Get Element Attribute    ${LIdentifyTypePersonal}    style
    run keyword if    "${TypeOfOwnerCode}" != "${VTypeOfOwnerCode}[0]" and "${Gdisplay}" == "display: none;"    RUN KEYWORDS    Set Style Display    ${Lid非个人}    block
    ...    AND    Set Style Display    ${Lid个人}    none
    #姓名
    ${name}=    PersonName
    run keyword if    '${TypeOfOwnerCode}' == '${VTypeOfOwnerCode}[0]'    input text    ${LOwnerName}    ${name}
    ...    ELSE    input text    ${LOwnerName}    ${name1}    #证件类型    #查看证件类型
    run keyword if    '${TypeOfOwnerCode}' == '${VTypeOfOwnerCode}[0]'    Select From List By Value    ${LIdentifyTypePersonal}    ${IdentifyTypeCode}
    ...    ELSE    Select From List By Value    ${LIdentifyTypeGroup}    ${IdentifyTypeCode}
    ${IDNum}=    GetDataOfIdentifyType    ${IdentifyTypeCode}
    input text    ${LIidentifyCard}    ${IDNum}
    #电话号码
    ${phoneNew}=    Phone    ${phone}
    input text    ${LMobilePhone}    ${phoneNew}
    # 类型 个人 不等于身份证    #填写年龄和性别
    Run Keyword If    '${IdentifyTypeCode}' != '${VIdentifyTypePersonal}[0]' and '${TypeOfOwnerCode}' == '${VTypeOfOwnerCode}[0]'    Run Keywords    Select From List By Value    ${LOwnerSex}    ${sex}
    ...    AND    Select From List By Value    ${LOwnerAge}    ${age}
